<style>
    #pop-up-boxes{
        position: fixed;width: 100%;height: 100%;z-index: 20;top: 0;left: 0;display: none;
    }
    #pop-up-boxes-content{
        width: 20%;
        margin-left: 40%;
        font-size: 14px;
        border: 1px solid black;color: black;
        margin-top: 10%;background-color: #fff;border-radius: 10px;
    }
    #pop-up-boxes-title label{display: inline;margin-bottom: 0;}
    #pop-up-boxes-title img{
        background-image: url('/public/assets/sysadmin/mylzp/img/error.png');cursor: pointer;
        float: right;left: 0;top: 17px;width: 16px;height: 16px;margin: 3px;border: none;border-radius: 10px;
    }
    #pop-up-boxes-text{
        padding: 20px;text-align: left;color: #555555;word-break: break-all; word-wrap:break-word;
        max-height: 300px;overflow-y: auto;
    }
    #pop-up-boxes-text input,#pop-up-boxes-text select{width: 100px;padding: 3px;}
    #pop-up-boxes-text a{
        display: inline-block;
        text-align: center;
        padding: 5px 10px;
        background-color: #5bc0de;
        color: #fff;
        border-radius: 5px;
    }
</style>
<div id="main">
    <div class="container-fluid">
        <div class="page-header">
            <div class="pull-left">
                <h1>日志管理</h1>
            </div>
            <div class="pull-right">
                <ul class="stats">
                    <li class='lightred'>
                        <i class="icon-calendar"></i>
                        <div class="details">
                            <span class="big"></span>
                            <span></span>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="breadcrumbs">
            <ul>
                <li>
                    <a href="javascript:void(0);">日志管理</a>
                    <i class="icon-angle-right"></i>
                </li>
                <li>
                    <a href="javascript:void(0);">酒店日志</a>
                    <i class="icon-angle-right"></i>
                </li>
            </ul>
            <div class="close-bread">
                <a href="#"><i class="icon-remove"></i></a>
            </div>
        </div>

        <div class="row-fluid">
            <div class="span12">
                <div class="box box-color box-bordered">
                    <div class="box-title">
                        <h3>
                            <i class="icon-th-list"></i>
                            日志列表
                        </h3>
                    </div>
                    <div class="box-content nopadding">
                        <table class="table table-hover table-nomargin dataTable table-bordered" width="100%">
                            <thead>
                                <tr>
                                    <th>所属酒店</th>
                                    <th>所属用户</th>
                                    <th>内容</th>
                                    <th>添加时间</th>
                                </tr>
                            </thead>
                            <?
                            foreach($re as $k=>$v){
                            ?>
                            <tr>
                                <td><?= $v['hotelName'] ?></td>
                                <td><?= $v['userName'] ?></td>
                                <td style="cursor: pointer;" onclick="showDiv(this)" value='<?=htmlspecialchars_decode($v['context'],ENT_NOQUOTES)?>'><?=mb_substr($v['context'],0,100,'utf-8').'...'; ?></td>
                                <td><?= $v['created'] ?></td>
                            </tr>
                            <?
                            }
                            ?>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="pop-up-boxes">
    <div id="pop-up-boxes-content">
        <div id="pop-up-boxes-title"><label>&nbsp;内容</label><img src="" /></div>
        <div id="pop-up-boxes-text">
        </div>
    </div>
</div>
<script type="text/javascript">
    $('#pop-up-boxes-title img').click(function(){
        $('#pop-up-boxes').css({'display':'none'});
    });
    function showDiv(obj){
        $('#pop-up-boxes-text').text($(obj).attr('value'));
        $('#pop-up-boxes').css({'display':'block'});
    }
</script>